<template>
  <view class="search-box" :style="{'background-color': bgcolor}" @click="click1">
   <view :style="{'border-radius': radius + 'px'}">
     <uni-icons type="contact" size="30"></uni-icons>搜索
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    props: {
      // 背景颜色
      bgcolor: {
        type: String,
        default: '#C00000'
      },
      // 圆角尺寸
      radius: {
        type: Number,
        // 单位是 px
        default: 20
      }
    },
    data() {
      return {
        
      };
    },
    methods: {
      click1 () {
        console.log('~~~')
        this.$emit('click','111')
        uni.navigateTo({
          url: '/subpkg/search/search'
        })
      }
    }
  }
</script>

<style lang="scss">
  .search-box {
    padding: 10px;
    height: 40px;
    text-align: center;
    // background-color: #c00000;
    view {
      // width: 98%;
      height: 100%;
      line-height: 40px;
      // border-radius: 20px;
      background-color: #fff;
    }
  }
</style>